The Blat CGI feature uses html GET which can be passed from a FORM if you like
There are 2 methods of using Blat from a web page (without using anything else)
1)
http://server/scripts/blat.exe
Your HTTP request must contain some vars with the command line.:
TO : the -t parameters of Blat
CC : the -c parameters of Blat
BCC : the -b parameters of Blat
SENDER : the -f parameters of Blat
FROM : the -i parameters of Blat
ORGANISATION : the -o parameters of Blat
SERVER : the -server parameters of Blat
SUBJECT : the -s parameters of Blat
PORT : the -port parameters of Blat
HOSTNAME : the -hostname parameters of Blat
TIMEOUT : the -ti parameter of Blat
These Variable are Boolean (if present and set TO "1" or "Y", added the option,
if not sent or set TO "N" or "0", remove the option)
NOH : the -noh parameters of Blat
NOH2 : the -noh2 parameters of Blat
MIME : the -mime parameters of Blat
UUENCODE : the -uuencode parameters of Blat
BASE64 : the -base64 parameters of Blat
REQUESTRECEIPT :the -r parameter of Blat
NOTIFY : the -d parameter of Blat
You can prefix these variable names with "BLAT_" (ie using BLAT_SUBJECT instead
SUBJECT) if you don't want see the variable content in the message. This goes for
user defined variables too, see the Blat_Data2 field in the example above.
Blat_success and Blat_failure will contain the URL for success and failure
messages and will be displayed when Blat completes. If you are sending from a
form, you can rename these files, and the browser will have the GET line in the
address bar. This is very useful for debugging (a "?" separates blat.exe from
the parms, and the parms are delimited by & as expected in a html GET line).
Here is an example from this page... Note, all this is on one line in your
browser's address bar, and there are no spaces!
http://localhost:89/cgi-bin/blat.exe?
Sender=Blat@Valid.add&
TO=MyName@Valid.add&
Blat_Subject=Blat+CGI+Demo+from+a+FORM&
Server=smtp.Valid.add&
Data1=User+Data+1&
Blat_Data2=User+Data+2&
Blat_success=%2Fblat-success.htm&
Blat_failure=%2Fblat-fail.htm&
Blat_Mime=Y
2)
Call from Web server
http://server/cgi-bin/blat.exe/Relative/WebPath/LineCommand.txt?Message_Body
\____________________________/\_______________________________/\___________/
A B C
A) Call Blat from your cgi-bin dir (or whatever your http server is configured for).
B) http://Relative/WebPath/LineCommand.txt must be a single line text file, with
the Blat command line, like (without the double quotes):
"- -t MyName@Valid.add -server smtp.Valid.add -f MyName@Valid.add -subject Subject_Line"
If you want to put spaces in your Subject_Line you must quote them just
like using the command line version of Blat!
C) ?Message_Body can not have spaces, not even %20's (which is what your browser
converts them to).
If Blat sent successfully, it outputs "Blat sending message result = 0 : Success"
to the browser.
You need only copy blat.exe to your cgi-bin directory.
Then make sure you have the blat-success.htm and blat-fail.htm files.
Example blat-success.htm
Blat send was a <b>Success!<p>lt;a href="javascript:history.go(-1)">back<a>
Example blat-fail.htm
Blat send <b>Failed!<p>lt;a href="javascript:history.go(-1)">back<a>